<!--
 * @Author: whs Wuhs_DSL@2022
 * @Date: 2022-12-19 09:26:48
 * @LastEditors: 吴华胜 765510616@qq.com
 * @LastEditTime: 2023-04-23 09:47:32
 * @FilePath: \DSLERP\jshERP-web\src\views\dashboard\Analysis.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div style="margin: 12px 12px 0px;">
    <index-chart></index-chart>
  </div>
</template>

<script>
  import IndexChart from './IndexChart'
  import * as zh from '@/lang/zh';
  import * as en from '@/lang/en';
  import { forIn } from 'lodash';
  export default {
    name: "Analysis",
    components: {
      IndexChart
    },
    data() {
      return {
        
      }
    },
    created() {
      this.checkZHandEn()
    },
    methods: {
      // 检测中英文
      checkZHandEn(){
      let enDefault = en.default
      let main ={}
      for (let obj in zh.default) {
        let object = {}
        for (let key in zh.default[obj]) {
          if(!enDefault[obj] || !enDefault[obj][key]){
            for (let o in en.default) {
              for (let k in en.default[o]) {
                if(key === k){
                  object[key] = en.default[o][k]
                  break;
                }else{
                  object[key] = ''
                }
              }
              if(object[key]){
                break
              }

            }
            if(!object[key]){
              object[key] = zh.default[obj][key]
            } 
          }

        }
        if(Object.keys(object).length){
          console.log(`${obj} :>>` , object);
          main[obj] = object
        }
      }
      }
    }
  }
</script>